﻿<Controls:SinacorWindow
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:Custom="http://schemas.xceed.com/wpf/xaml/datagrid"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" 
    xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls"    
    xmlns:Model="clr-namespace:Sinacor.UI.Bovespa.ManutencaoOrdens.Model;assembly=Sinacor.UI.Bovespa.ManutencaoOrdens.Model"
    WindowStartupLocation="CenterScreen" 
    WindowState="Maximized" 
    Title="{DynamicResource Bovespa.Ordens.Label.ErrosRecepcaoOfertasNegocios}"
    x:Class="Sinacor.UI.Bovespa.ManutencaoOrdens.View.SmartClient.ErrosRecepcaoOfertasNegocios"
    ModulePlus="False"
    ModuleId="ORD">

    <Controls:SinacorExpanderContainer Width="Auto" 
								       Height="Auto">
        <Controls:SinacorExpanderContainer.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Controls:SinacorExpanderContainer.RowDefinitions>
        <Controls:SinacorExpander   Grid.Row="0"
								    Header="{DynamicResource Bovespa.Ordens.Label.Pesquisa}"
									IsExpanded="True"
									Margin="0,0,0,0">
            <Grid>
                <Controls:SinacorLabel Content="{DynamicResource Bovespa.Ordens.Label.DataMov}"
                                       Width="112"
                                       Margin="0,0,0,0"
									   HorizontalAlignment="Left" />
                <Controls:SinacorComboBox   IsSynchronizedWithCurrentItem="True" 
											HorizontalAlignment="Left" 
											VerticalAlignment="Top" 
											Margin="116,0,0,0"
                                            TabIndex="1"
                                            Name="cmbErrosRecepcaoOfertaNegocio"
                                            ItemsSource="{Binding ListaCalendarios}"
                                            SelectedValuePath="DataFormatada" 
                                            DisplayMemberPath="DataFormatada" 
                                            SelectedValue="{Binding ModelErroRecepcaoOferta.DataPregao}"
											Width="100"/>
                <Controls:SinacorButton HorizontalAlignment="Left" 
										Content="{DynamicResource Bovespa.Ordens.Label.Pesquisar}" 
										Margin="222,0,0,0" 
										VerticalAlignment="Top" 
										Width="80"
										IsDefault="True"
                                        ToolTip="{DynamicResource Bovespa.Ordens.Label.Pesquisar}"
										TabIndex="2" 
                                        Name="btnPesquisar" 
                                        OnBufferedClick="btnPesquisar_OnBufferedClick"/>
                <Controls:SinacorButton Margin="308,0,0,0"
										Width="80" 
										Content="{DynamicResource Bovespa.Ordens.Label.Acerto}" 
										VerticalAlignment="Top"
										HorizontalAlignment="Left"
                                        ToolTip="{DynamicResource Bovespa.Ordens.Label.Acerto}"
										TabIndex="3"
                                        Name="btnAcerto" 
                                        OnBufferedClick="btnAcerto_OnBufferedClick"
										IsEnabled="False" />
            </Grid>
        </Controls:SinacorExpander>
        <Controls:SinacorExpander   Grid.Row="1" 			
									HorizontalAlignment="Stretch"
									VerticalAlignment="Stretch"
									Header="{DynamicResource Bovespa.Ordens.Label.Ordens}"
									Margin="0,4,0,0"
									IsExpanded="True">
            <Grid>
                <Controls:SinacorDataGrid HorizontalAlignment="Stretch" 										
                                          Width="Auto" 	                                          
                                          Name="dtgOrdem"
                                          IsSynchronizedWithCurrentItem="True" 										
                                          VerticalAlignment="Stretch"
                                          ItemsSource="{Binding ListaErrosRecepcoesOfertas}" 
                                          Margin="0,0,0,0">
                    
                    <Controls:SinacorDataGrid.ContextMenuTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <Controls:SinacorContextMenuItem
                                        x:Name="Acerto"
                						Header="{DynamicResource Bovespa.Ordens.Label.Acerto}"                                        
                                        Loaded="Acerto_Loaded"
                                        IsEnabled="False"
                                        Click="Acerto_Click"/>
                                <Controls:SinacorContextMenuItem
                                        x:Name="Pesquisar"
                                    IsEnabled="False"
                                        Header="{DynamicResource Bovespa.Ordens.Label.Pesquisar}"                                        
                                        Loaded="Pesquisar_Loaded"
                                        Click="Pesquisar_Click">
                                </Controls:SinacorContextMenuItem>
                            </StackPanel>
                        </DataTemplate>
                    </Controls:SinacorDataGrid.ContextMenuTemplate>
                    <Controls:SinacorDataGrid.Columns>
                        <Controls:Column Name="Data"
                                         HorizontalCellAlignment="Center"																
                                         Title="Bovespa.Ordens.Label.Data"
                                         DisplayMemberPath="DataOrdem"
                                         />
                        <Controls:Column Name="Ordem" 										
                                         HorizontalCellAlignment="Right"															
                                         Title="Bovespa.Ordens.Label.Ordem" 
                                         DisplayMemberPath="Ordem"/>
                        <Controls:Column Name="DescricaoErro" 											
                                         HorizontalCellAlignment="Left"						
                                         Title="Bovespa.Ordens.Label.DescricaoErro" 
                                         DisplayMemberPath="Descricao"/>
                    </Controls:SinacorDataGrid.Columns>
                </Controls:SinacorDataGrid>
            </Grid>
        </Controls:SinacorExpander>
        <Controls:SinacorExpander   Grid.Row="2" 			
									HorizontalAlignment="Stretch"
									VerticalAlignment="Stretch"
									Header="{DynamicResource Bovespa.Ordens.Label.Negocios}"
									Margin="0,4,0,0"
									Width="Auto"
									Height="Auto"
									IsExpanded="True">
            <Grid>
                <Controls:SinacorDataGrid HorizontalAlignment="Stretch" 										
                                          Width="Auto"
                                          ItemsSource="{Binding ListaErrosRecepcoesNegocios}"
                                          Name="dtgNegocio"
                                          IsSynchronizedWithCurrentItem="True" 										
                                          VerticalAlignment="Stretch" 										
                                          Margin="0,0,0,0">
                    <Controls:SinacorDataGrid.ContextMenuTemplate>
                        <DataTemplate>
                            <StackPanel>
                                <Controls:SinacorContextMenuItem 
                                        x:Name="Acerto"   
                                    IsEnabled="False"
                						Header="{DynamicResource Bovespa.Ordens.Label.Acerto}"                                        
                                        Loaded="Acerto_Loaded"
                                        Click="Acerto_Click"                                                                     
                                     />
                                <Controls:SinacorContextMenuItem
                                        x:Name="Pesquisar"
                                    IsEnabled="False"
                                        Header="{DynamicResource Bovespa.Ordens.Label.Pesquisar}"                                        
                                        Loaded="Pesquisar_Loaded"
                                        Click="Pesquisar_Click"
                                    ></Controls:SinacorContextMenuItem>
                            </StackPanel>
                        </DataTemplate>
                    </Controls:SinacorDataGrid.ContextMenuTemplate>
                    <Controls:SinacorDataGrid.Columns>
                        <Controls:Column Name="Pregao" 										
                                         HorizontalCellAlignment="Center"																
                                         Title="Bovespa.Ordens.Label.Pregao" 
                                         DisplayMemberPath="DataPregao"/>
                        <Controls:Column Name="Bolsa" 										
                                         HorizontalCellAlignment="Left"										
                                         Title="Bovespa.Ordens.Label.Bolsa" 
                                         DisplayMemberPath="Bolsa"/>
                        <Controls:Column Name="Ativo" 						
                                         HorizontalCellAlignment="Left"						
                                         Title="Bovespa.Ordens.Label.Ativo"
                                         DisplayMemberPath="Ativo"/>
                        <Controls:Column Name="Negocio" 							
                                         HorizontalCellAlignment="Left"						
                                         Title="Bovespa.Ordens.Label.negocio"
                                         DisplayMemberPath="Numero"/>
                        <Controls:Column Name="Natureza" 									
                                         HorizontalCellAlignment="Left"						
                                         Title="Bovespa.Ordens.Label.Natureza"
                                         DisplayMemberPath="NaturezaOperacao"/>
                        <Controls:Column Name="DescricaoErro" 									
                                         HorizontalCellAlignment="Left"						
                                         Title="Bovespa.Ordens.Label.DescricaoErro" 
                                         DisplayMemberPath="DescricaoErro"/>
                    </Controls:SinacorDataGrid.Columns>
                </Controls:SinacorDataGrid>
            </Grid>
        </Controls:SinacorExpander>

    </Controls:SinacorExpanderContainer>

</Controls:SinacorWindow>